﻿@model ElingOA6_Admin_DSJCJ.Areas.Admin.Models.DocumentClsViewModel
<table class="tableForm">
    <tr>
        <td>
            @Html.DevExpress().CheckBox(
                    settings =>
                    {
                        settings.Name = "chkPubQJ";
                        settings.Checked = Model.DocClsAuthorityList.Exists(s => s.FPronoun == "ALL" && s.FAuthorityType == "PUB") ? true : false;
                        settings.Text = "全局";
                        settings.Properties.ClientSideEvents.Init = "function(s,e){chkQJ_ValueChanged('Pub')}";
                        settings.Properties.ClientSideEvents.ValueChanged = "function(s,e){chkQJ_ValueChanged('Pub')}";
                    }).GetHtml()
        </td>
    </tr>
</table>
<table class="tableForm" id="tablePub" style="display:none">
    <tr>
        <td class="tdClass" colspan="2">
            @Html.DevExpress().CheckBox(
                    settings =>
                    {
                        settings.Name = "chkPubBM";
                        settings.Checked = Model.DocClsAuthorityList.Exists(s => s.FPronoun == "ASSIGNDEPT" && s.FAuthorityType == "PUB") ? true : false;
                        settings.Text = "指定部门";
                        settings.Properties.ClientSideEvents.Init = "function(s,e){chkBM_ValueChanged('Pub')}";
                        settings.Properties.ClientSideEvents.ValueChanged = "function(s,e){chkBM_ValueChanged('Pub')}";
                    }).GetHtml()
        </td>
    </tr>
    <tr>
        <td colspan="2">
            <table width="70%" id="tablePubBM" style="display:none" align="center" cellpadding="0" cellspacing="0" bordercolordark="white" bordercolorlight="#BEBEBE">
                <tr>
                    <th width="20%" style="text-align: center">
                        <img src="@Url.Content("~/Content/images/add.gif")" style="cursor:pointer"  onclick="addRowBm('Pub');"/>&nbsp;操作</th>
                    <th width="50%" style="text-align: center">
                        部门</th>
                    <th width="30%" style="text-align: center">
                        级别</th>
                </tr>
            </table>
        </td>
    </tr>
    <tr>
        <td class="tdClass" colspan="2">
            @Html.DevExpress().CheckBox(
                    settings =>
                    {
                        settings.Name = "chkPubGZZ";
                        settings.Checked = Model.DocClsAuthorityList.Exists(s => s.FPronoun == "GROUP" && s.FAuthorityType == "PUB") ? true : false;
                        settings.Text = "指定工作组";
                        settings.Properties.ClientSideEvents.Init = "function(s,e){chkGZZ_ValueChanged('Pub')}";
                        settings.Properties.ClientSideEvents.ValueChanged = "function(s,e){chkGZZ_ValueChanged('Pub')}";
                    }).GetHtml()
        </td>
    </tr>
    <tr>
        <td colspan="2">
            <table width="70%" id="tablePubGZZ" style="display:none" align="center" cellpadding="0" cellspacing="0" bordercolordark="white" bordercolorlight="#BEBEBE">
                <tr>
                    <th width="20%" style="text-align: center">
                        <img src="@Url.Content("~/Content/images/add.gif")" style="cursor:pointer"  onclick="addRowGZZ('Pub');"/>&nbsp;操作</th>
                    <th width="50%" style="text-align: center">
                        工作组</th>
                    <th width="30%" style="text-align: center">
                        级别</th>
                </tr>
            </table>
        </td>
    </tr>
    <tr>
        <td class="tdClass" colspan="2">
            @Html.DevExpress().CheckBox(
                    settings =>
                    {
                        settings.Name = "chkPubGW";
                        settings.Checked = Model.DocClsAuthorityList.Exists(s => s.FPronoun == "POST" && s.FAuthorityType == "PUB") ? true : false;
                        settings.Text = "指定岗位";
                        settings.Properties.ClientSideEvents.Init = "function(s,e){chkGW_ValueChanged('Pub')}";
                        settings.Properties.ClientSideEvents.ValueChanged = "function(s,e){chkGW_ValueChanged('Pub')}";
                    }).GetHtml()
        </td>
    </tr>
    <tr>
        <td colspan="2">
            <table width="70%" id="tablePubGW" style="display:none" align="center" cellpadding="0" cellspacing="0" bordercolordark="white" bordercolorlight="#BEBEBE">
                <tr>
                    <th width="20%" style="text-align: center">
                        <img src="@Url.Content("~/Content/images/add.gif")" style="cursor:pointer"  onclick="addRowGW('Pub')"/>&nbsp;操作</th>
                    <th width="80%" style="text-align: center" colspan="2">
                        岗位</th>
                </tr>
            </table>
        </td>
    </tr>
    <tr>
        <td style="width: 15%">
            @Html.DevExpress().CheckBox(
                    settings =>
                    {
                        settings.Name = "chkPubYHZ";
                        settings.Checked = Model.DocClsAuthorityList.Exists(s => s.FPronoun == "ROLE" && s.FAuthorityType == "PUB") ? true : false;
                        settings.Text = "指定用户组";
                        settings.Properties.ClientSideEvents.Init = "function(s,e){chkYHZ_ValueChanged('Pub')}";
                        settings.Properties.ClientSideEvents.ValueChanged = "function(s,e){chkYHZ_ValueChanged('Pub')}";
                    }).GetHtml()
        </td>
        <td style="width: 85%" class="tdClass">
            @Html.DevExpress().ButtonEdit(settings =>
       {
           settings.Name = "txtPubYHZ";
           settings.Width = System.Web.UI.WebControls.Unit.Percentage(96);
           settings.Height = System.Web.UI.WebControls.Unit.Percentage(100);
           settings.ReadOnly = true;
           //settings.Text = ViewData["FEmpName"].ToString(); ;
           settings.Properties.Buttons.Add("选择");
           settings.Properties.ClientSideEvents.ButtonClick = "function(s,e){chooseGroup('Pub')}";
           //settings.Properties.ClientSideEvents.Validation = "function(s,e){notEmptyValidation(s,e,'对应员工')}";
       }).GetHtml()
        </td>
    </tr>
    <tr>
        <td style="width: 15%">
            @Html.DevExpress().CheckBox(
                    settings =>
                    {
                        settings.Name = "chkPubUser";
                        settings.Checked = Model.DocClsAuthorityList.Exists(s => s.FPronoun == "PERSON" && s.FAuthorityType == "PUB") ? true : false;
                        settings.Text = "指定人";
                        settings.Properties.ClientSideEvents.Init = "function(s,e){chkUser_ValueChanged('Pub')}";
                        settings.Properties.ClientSideEvents.ValueChanged = "function(s,e){chkUser_ValueChanged('Pub')}";
                    }).GetHtml()
        </td>
        <td style="width: 85%" class="tdClass">
            @Html.DevExpress().ButtonEdit(settings =>
       {
           settings.Name = "txtPubUser";
           settings.Width = System.Web.UI.WebControls.Unit.Percentage(96);
           settings.Height = System.Web.UI.WebControls.Unit.Percentage(100);
           settings.ReadOnly = true;
           //settings.Text = ViewData["FEmpName"].ToString(); ;
           settings.Properties.Buttons.Add("选择");
           settings.Properties.ClientSideEvents.ButtonClick = "function(s,e){chooseUser('Pub')}";
           //settings.Properties.ClientSideEvents.Validation = "function(s,e){notEmptyValidation(s,e,'对应员工')}";
       }).GetHtml()
        </td>
    </tr>
</table>
